package com.nuoniu.sibanyun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.SysDictType;
import com.nuoniu.sibanyun.entity.dto.DictTypeSaveDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 字典类型表 Mapper 接口
 * </p>
 *
 * @author baiqiang
 * @since 2020-05-25
 */
public interface SysDictTypeMapper extends BaseMapper<SysDictType> {

    @Select("select id,dict_name,dict_code,dict_type from sys_dict_type")
    List<DictTypeSaveDto> getAll();

    @Select("select * from sys_dict_type where dict_code=#{dictCode}")
    SysDictType getByCode(String dictCode);
}
